﻿using System.Security.Cryptography.X509Certificates;

namespace Flowertwig.Utils.Entities.Security
{
    public class LocalCertificationSelectionInfo
    {
        protected string _target;
        protected X509CertificateCollection _localCerts;
        protected X509Certificate _remoteCert;
        protected string[] _accIssures;
        protected X509Certificate _selLocalCert;

        public string TargetHost
        {
            get { return _target; }
            set { _target = value; }
        }

        public X509Certificate SelectedCertificate
        {
            get { return _selLocalCert; }
            set { _selLocalCert = value; }
        }

        public X509CertificateCollection LocalCertifications
        {
            get { return _localCerts; }
            set { _localCerts = value; }
        }

        public X509Certificate RemoteCertificate
        {
            get { return _remoteCert; }
            set { _remoteCert = value; }
        }

        public string[] AcceptableIssures
        {
            get { return _accIssures; }
            set { _accIssures = value; }
        }

        public LocalCertificationSelectionInfo(string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssures)
        {
            _target = targetHost;
            _localCerts = localCertificates;
            _remoteCert = remoteCertificate;
            _accIssures = acceptableIssures;
        }
    }
}
